import ajax from '@/utils/request'
// 获取用户的频道
export const getChannels = () => {
  return ajax({
    method: 'GET',
    url: '/app/v1_0/user/channels'
  })
}

// 获取全部频道
export const getAllChannels = () => {
  return ajax({
    method: 'GET',
    url: '/app/v1_0/channels'
  })
}
// 添加频道
// [{id : 频道id,seq: 1}] seq指的是数据
export const addChannel = (channels) => {
  return ajax({
    method: 'PUT',
    url: '/app/v1_0/user/channels',
    data: {
      channels
    }
  })
}
// 批量删除频道按钮
export const delChannel = (channels) => {
  return ajax({
    method: 'DELETE',
    url: '/app/v1_0/user/channels',
    data: {
      channels
    }
  })
}
